﻿#include "pch.h"

CEParaWrapper::CEParaWrapper()
{
    memset((void *)this, 0, sizeof(CEParaWrapper));
}

void CEParaWrapper::printSelf(char *captionUpper, int32_t)
{
    char caption[1024];
    sprintf(caption, "%s:%s", captionUpper, "CEParaWrapper");
    print4x(this, sizeof(CEParaWrapper), caption);
    if (this->head)
    {
        sprintf(caption, "%s:%s", captionUpper, "CEParaWrapper.head");
        print4x(this->head, this->len * this->size, caption);
    }
}

// sub_1001D0D0
CEParaWrapper *CEParaWrapper::init(LPVOID epara)
{
    this->init_(epara);
    return this;
};

// sub_1001DD90
CEParaWrapper *CEParaWrapper::init_(LPVOID epara)
{
    this->init__(epara);
    *(this->num) = 1;
    return this;
};

// sub_1001E280
CEParaWrapper *CEParaWrapper::init__(LPVOID head)
{
    this->head = head;
    this->size = 12;
    this->len = 1;
    this->tail = 0;
    this->needFreeHead = false;
    this->num = &(this->numValue);
    *(this->num) = 0;
    return this;
};

// sub_1001AB30
int32_t CEParaWrapper::getEparamMethod()
{
    return ((LPCTDLLEPARA)(this->head))->method;
};

// sub_1001D350
CBaseWrapper *CEParaWrapper::close(char flag)
{
    this->close();
    if (flag & 1)
    {
        delete this;
        return NULL;
    }
    return this;
};

// sub_1001D660
CBaseWrapper *CEParaWrapper::close()
{
    return this->close_();
};

// sub_1001AB50
int32_t CEParaWrapper::isBasedOnArea()
{
    TDLLEPARA *pE = (TDLLEPARA *)this->head;
    return pE->based == 0;
};

// sub_1001AB10
int32_t CEParaWrapper::getLen()
{
    return this->len;
};
